Skip to content

Conversation

@catalinaperalta
Copy link
Member

@catalinaperalta catalinaperalta commented Nov 20, 2025

Fixes #12963

@catalinaperalta
Copy link
Member Author

Relies on #13027

@catalinaperalta catalinaperalta marked this pull request as ready for review November 21, 2025 22:22
Copilot AI review requested due to automatic review settings November 21, 2025 22:22
Copilot finished reviewing on behalf of catalinaperalta November 21, 2025 22:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds batch generation support to the tsp-client tool, enabling users to process multiple TypeSpec directories in a single command by defining a batch configuration in the parent tsp-location.yaml file.

  • Introduces a new batch field to TspLocation interface for specifying multiple subdirectories
  • Makes directory, commit, and repo fields optional in TspLocation to support batch mode
  • Implements recursive batch processing in updateCommand that processes each subdirectory independently

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
tools/tsp-client/src/typespec.ts Modified TspLocation interface to support batch mode by making standard fields optional and adding batch array field
tools/tsp-client/src/fs.ts Updated readTspLocation to validate batch configurations and handle optional directory normalization
tools/tsp-client/src/commands.ts Added processBatchUpdate function and modified updateCommand, syncCommand, and generateCommand to support batch processing
tools/tsp-client/src/npm.ts Added tspClientCommand helper function (currently unused)
tools/tsp-client/test/commands.spec.ts Added tests for batch configuration reading and batch directory processing with/without local spec paths
tools/tsp-client/test/examples/batch/**/*.yaml Added test fixtures for batch configuration including parent and child tsp-location.yaml files
tools/tsp-client/test/examples/batch/service/**/*.tsp Added TypeSpec test fixtures for rbac, settings, and restore services
tools/tsp-client/test/examples/batch/service/package.json Added emitter package configuration for batch test scenarios

@catalinaperalta
Copy link
Member Author

/check-enforcer override

@catalinaperalta catalinaperalta merged commit 6806ab4 into main Nov 22, 2025
5 checks passed
@catalinaperalta catalinaperalta deleted the tsp-client/batch branch November 22, 2025 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tsp-client] Support batch update

5 participants